﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _3._6
{
    public class Vehicle
    {
        public int numoftire;
        public string color;
        public double weight;
        public double speed;

        public Vehicle() {
            this.numoftire = 4;
            this.speed= 0;
        }
        public Vehicle(int numoftire, double speed)
        {
            this.numoftire = numoftire;
            this.speed = speed;
        }
        public virtual void accelarate(double value)
        {
            Console.WriteLine("汽车加速");
            this.speed += value;
        }
        public  virtual void deaccelarate(double value) {
            Console.WriteLine("汽车减速");
            this.speed -= value;

        }
        public virtual void stop()
        {
            Console.WriteLine("汽车停下");
            

        }

    }
}
